package org.oslims.client.service;

import java.util.List;

import org.oslims.domain.AbstractSample;
import org.oslims.domain.Analysis;
import org.oslims.domain.Mixture;
import org.oslims.domain.Request;
import org.oslims.domain.Sample;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface SampleServiceAsync {

	void saveOrUpdateSample(Sample sample, AsyncCallback<Void> callback);

	void getSamplesByRequest(Request request, AsyncCallback<List<Sample>> callback);

	void getSamplesByAnalysisAndState(Analysis analysis, String state, AsyncCallback<List<AbstractSample>> callback);

	void markSamplesAsRecieved(List<Sample> samples, String storagePlace, AsyncCallback<Void> callback);

	void searchSamples(String sampleCode, String description, String origin, String requestCode, String sampleType, String storagePlace, AsyncCallback<List<Sample>> callback);

	void importSamplesForRequest(List<Sample> sample, Request request, AsyncCallback<Void> callback);

	void getSampleCount(Request request, AsyncCallback<Integer> callback);

	void getSamplesByRequest(Request request, int start, int length, String sortBy, boolean desc, AsyncCallback<List<Sample>> callback);

	void getAllMixturesByRequest(Request request, AsyncCallback<List<Mixture>> callback);

	void markMixturesAsPrepared(List<Mixture> mixtures, String storagePlace, AsyncCallback<Void> callback);

	void saveOrUpdateMixture(Mixture mixture, AsyncCallback<Void> callback);

	void getAllMixturesByRequest(Request request, int start, int length, String sortBy, boolean desc, AsyncCallback<List<Mixture>> callback);

	void getMixtureCount(Request request, AsyncCallback<Integer> callback);

	void importMixtureForRequest(List<Mixture> mixture, Request request, AsyncCallback<Void> callback);

	void getAllSamplesByRequest(Request request, AsyncCallback<List<AbstractSample>> callback);

	void searchAllSamples(String sampleCode, String description, String origin, String requestCode, String sampleType, String storagePlace,
			AsyncCallback<List<AbstractSample>> callback);

	void searchMixtures(String sampleCode, String description, String origin, String requestCode, String sampleType, String storagePlace, AsyncCallback<List<Mixture>> callback);

	void getAllSamplesReadyForAnalysisByRequest(Request request, AsyncCallback<List<AbstractSample>> callback);

	void validateSampleResults(List<AbstractSample> samples, AsyncCallback<Void> callback);

}
